package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description AgencyCertificationAuditController
 * @Author luohai
 * @Date 2024-12-03
 */
@RestController("AgencyCertificationAuditController")
@RequestMapping("agency/agency-certification-audit")
@Api(tags = "机构端 - 认证相关接口")
public class AgencyCertificationAuditController {

    @Autowired
    private IAgencyCertificationService agencyCertificationService;

    /**
     * 机构提交认证申请
     * @param dto
     */
    @PostMapping
    @ApiOperation("机构提交认证申请")
    public void agencyCertificationAudit(@RequestBody AgencyCertificationAuditAddReqDTO dto){
        agencyCertificationService.agencyCertificationAudit(dto);
    }

    /**
     * 查询最新的驳回原因
     * @return
     */
    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public RejectReasonResDTO rejectReason(){
        return agencyCertificationService.rejectReason();
    }
}
